styleproperty: Get rid of _gtk_style_property_is_shorthand()
authorBenjamin Otte <otte@redhat.com>
Sat, 31 Dec 2011 12:50:03 +0000 (13:50 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 9 Jan 2012 17:37:51 +0000 (18:37 +0100)
Use GTK_IS_CSS_SHORTHAND_PROPERTY() instead now that we have it.

gtk/gtkcssprovider.c
gtk/gtkstyleproperties.c
gtk/gtkstyleproperty.c
gtk/gtkstylepropertyprivate.h

index e3fc75ac89c7aaae1c9045a7886de1882615e89b..9293a55c49b53de3626e1ba95bb2fef5987cd7ef 100644 (file)
@@ -31,6 +31,7 @@
 #include "gtkcssparserprivate.h"
 #include "gtkcsssectionprivate.h"
 #include "gtkcssselectorprivate.h"
+#include "gtkcssshorthandpropertyprivate.h"
 #include "gtksymboliccolor.h"
 #include "gtkstyleprovider.h"
 #include "gtkstylecontextprivate.h"
@@ -1189,7 +1190,7 @@ gtk_css_ruleset_add (GtkCssRuleset          *ruleset,
       ruleset->set_styles = _gtk_bitmask_new ();
     }
 
-  if (_gtk_style_property_is_shorthand (prop))
+  if (GTK_IS_CSS_SHORTHAND_PROPERTY (prop))
     {
       GParameter *parameters;
       guint i, n_parameters;
index 48dc88b11eb99a00a20ffe5a8511d4ad8665ddda..fc47984b6bf4d4b8ac30e9238710782df8ca4393 100644 (file)
@@ -31,6 +31,7 @@
 #include "gtkanimationdescription.h"
 #include "gtkgradient.h"
 #include "gtkshadowprivate.h"
+#include "gtkcssshorthandpropertyprivate.h"
 #include "gtkcsstypesprivate.h"
 #include "gtkborderimageprivate.h"
 
@@ -559,7 +560,7 @@ _gtk_style_properties_set_property_by_property (GtkStyleProperties     *props,
   else
     g_return_if_fail (style_prop->pspec->value_type == value_type);
 
-  if (_gtk_style_property_is_shorthand (style_prop))
+  if (GTK_IS_CSS_SHORTHAND_PROPERTY (style_prop))
     {
       GParameter *parameters;
       guint i, n_parameters;
index 7364e9912e1dd1e63f34e416b8082499e9ed441c..a2073be6125e97deaaac5d4edebbd70fdc3da60b 100644 (file)
@@ -2675,14 +2675,6 @@ _gtk_style_property_get_initial_value (const GtkStyleProperty *property)
   return &property->initial_value;
 }
 
-gboolean
-_gtk_style_property_is_shorthand  (const GtkStyleProperty *property)
-{
-  g_return_val_if_fail (property != NULL, FALSE);
-
-  return property->pack_func != NULL;
-}
-
 GParameter *
 _gtk_style_property_unpack (const GtkStyleProperty *property,
                             const GValue           *value,
@@ -2730,7 +2722,7 @@ _gtk_style_property_query (const GtkStyleProperty  *property,
 
   if (val)
     _gtk_style_property_resolve (property, props, state, context, (GValue *) val, value);
-  else if (_gtk_style_property_is_shorthand (property))
+  else if (GTK_IS_CSS_SHORTHAND_PROPERTY (property))
     _gtk_style_property_pack (property, props, state, context, value);
   else
     _gtk_style_property_default_value (property, props, state, value);
@@ -3268,7 +3260,7 @@ _gtk_style_property_register (GParamSpec               *pspec,
   node->print_func = print_func;
   node->unset_func = unset_func;
 
-  if (!_gtk_style_property_is_shorthand (node))
+  if (!GTK_IS_CSS_SHORTHAND_PROPERTY (node))
     {
       _gtk_style_property_generate_id (node);
 
index 263cc9f79bf1a1bc54cd424d816c3a3a747cc6e8..d3768dca99a09797626efce0ee96068e4db11040 100644 (file)
@@ -98,7 +98,6 @@ guint                    _gtk_style_property_get_id        (const GtkStyleProper
 const GValue *           _gtk_style_property_get_initial_value
                                                            (const GtkStyleProperty *property);
 
-gboolean                 _gtk_style_property_is_shorthand  (const GtkStyleProperty *property);
 GParameter *             _gtk_style_property_unpack        (const GtkStyleProperty *property,
                                                             const GValue           *value,
                                                             guint                  *n_params);